<?if(!defined("PROLOG_INCLUDED") || PROLOG_INCLUDED!==true)die();?>
<?if(!empty($arResult) AND !empty($arParams["SHOW_FIELDS"])):?>
<?
	$arDecorate = Array(
		"LOGIN" => '<a href="/system/admin/users/user.php?ID=#ID#">#LOGIN#</a>',
	);
?>
	<table>
		<thead>
			<tr>
			<?foreach ($arParams["SHOW_FIELDS"] as $field):?>
				<th>
					<?=LANG('SYTEM_USER_'.$field)?>
				</th>
			<?endforeach?>
			</tr>
		</thead>
		<?foreach ($arResult['USERS'] as $n => $arItem):?>
			<tr <?=$n%2 ? 'class="altrow"' : ''?>>
				<?foreach ($arParams["SHOW_FIELDS"] as $field):?>
					<td>
						<?if (array_key_exists($field, $arDecorate)):?>
							<?=GetStrTpl($arDecorate[$field], $arItem)?>
						<?else:?>
							<?=$arItem[$field]?>
						<?endif?>
					</td>
				<?endforeach;?>
			</tr>
		<?endforeach?>
	</table>
<div class="paginator">
	<?=str_replace('#URL#', GetCurPage().'?PAGE=', $arResult['PAGINATOR'])?>
</div>
<?endif?>